home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / Mark Pilgrim / Startup Screen Picker 1.2 / source / ssp INIT ƒ / ssp code ƒ / init.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-10-30  |  1.5 KB  |  61 lines  |  [TEXT/KAHL]

  1. /**********************************************************************\
  2.  
  3. File:        init.c
  4.  
  5. Purpose:    This module handles INIT initialization and installation.
  6.             
  7. This program is free software; you can redistribute it and/or modify
  8. it under the terms of the GNU General Public License as published by
  9. the Free Software Foundation; either version 2 of the License, or
  10. (at your option) any later version.
  11.  
  12. This program is distributed in the hope that it will be useful,
  13. but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15. GNU General Public License for more details.
  16.  
  17. You should have received a copy of the GNU General Public License
  18. along with this program in a file named "GNU General Public License".
  19. If not, write to the Free Software Foundation, 675 Mass Ave,
  20. Cambridge, MA 02139, USA.
  21.  
  22. \**********************************************************************/
  23.  
  24. #include "init.h"
  25. #include "main.h"
  26. #include "environment.h"
  27. #include "really notify.h"
  28. #include "prefs.h"
  29.  
  30. void __GetA4(void)
  31. {
  32.     asm {
  33.         bsr.s    @1
  34.         dc.l    0            ;  store A4 here
  35. @1        move.l    (sp)+,a1
  36.     }
  37. }
  38. void main(void)
  39. {
  40.     short            resultCode;
  41.     
  42.     RememberA0();
  43.     SetUpA4();
  44.     
  45.     CheckEnvironment();
  46.     
  47.     resultCode=PreferencesInit();
  48.     if ((resultCode!=prefs_allsWell) && (resultCode!=prefs_virginErr))
  49.         StartupError(resultCode);
  50.     else
  51.     {
  52.         resultCode=DoSSThing();
  53.         if (resultCode==allsWell)
  54.             StartupGood();
  55.         else
  56.             StartupError(resultCode);
  57.     }
  58.     
  59.     RestoreA4();
  60. }
  61.